import React, { Component } from 'react'

export default class Child1 extends Component {
  render() {
    console.log(this.props)
    return (
    <div className='box'>
        {this.props.header}
        <button onClick={() => {
            this.props.onChangeNum(2)
        }}>+</button>
        <h1>Child1</h1>
        <p>num:{this.props.num}</p>
        <div className='box'>
            {this.props.children}
        </div>
        {this.props.footer}
    </div>
    )
  }
}
